<template>
  <el-form :inline="true" :model="form" label-width="80" class="search-form">
    <el-row :gutter="20">
      <el-col :xs="24" :sm="12" :lg="8" :xl="6">
        <el-form-item label="活动名称：">
          <el-input v-model="form.activitiesName" clearable placeholder="请输入" />
        </el-form-item>
      </el-col>
      <!-- <el-col :xs="24" :sm="12" :lg="8" :xl="6">
        <el-form-item label="状态：">
          <el-select v-model="form.status" placeholder="请选择" clearable style="width:100%">
              <el-option v-for="(item,index) in optionData.baseType" :key="index" :label="item.name" :value="item.id" />
            </el-select>
        </el-form-item>
      </el-col> -->
      <el-col :xs="24" :sm="12" :lg="8" :xl="6">
        <el-form-item>
          <el-button type="primary" icon="Search" @click="toSearch()">搜索</el-button>
          <el-button type="default" icon="Refresh" @click="toSearch('reset')">重置</el-button>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script setup lang="ts">
import { useSearch } from '/@/assets/compositionFn/search';
const emit = defineEmits(['confirm']);
let searchForm = {
  activitiesName: null,
};
const { form, optionData, isReset } = useSearch(searchForm);

const toSearch = (type?:any)=>{
  isReset(type);
  emit('confirm', form);
};
defineExpose({
  form,
  toSearch
})
</script>

<style>

</style>